///*
// * To change this template, choose Tools | Templates
// * and open the template in the editor.
// */
//package scheduling;
//
//import facades.CandidateFacade;
//import entities.Candidate;
//import java.util.logging.Level;
//import java.util.logging.Logger;
//import javax.ejb.Schedule;
//import javax.ejb.Stateless;
//import javax.enterprise.event.Event;
//import javax.inject.Inject;
//import scheduling.qualifiers.RememberCandidateMailEvent;
//
///**
// *
// * @author damfercer
// */
//@Stateless
//public class RememberMailEJB {
//    @Inject
//    CandidateFacade candidateFacade;
//    @Inject
//    @RememberCandidateMailEvent
//    Event<Candidate> rememberCandidateNoPicturesEvent;
//    
//    @Schedule(second="0", minute="0", hour="4", dayOfWeek="Wed", persistent=false)
//    public void sendRememberCandidateMailNoPictures() {
//        Candidate candidateDamian= candidateFacade.find(1);
//        rememberCandidateNoPicturesEvent.fire(candidateDamian);
//        try {
//            Thread.sleep(600000);
//            for (Candidate candidate : candidateFacade.getCandidatesWithNoPictures()) {
//                rememberCandidateNoPicturesEvent.fire(candidate);
//            }
//        } catch (InterruptedException ex) {
//            Logger.getLogger(RememberMailEJB.class.getName()).log(Level.SEVERE, "No pudo dormir hilo", "No pudo dormir hilo");
//        }
//    }
//}
